From 72f8a245d5253195619a8976e62b9375cf626223 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Thu, 9 Dec 2021 00:35:56 +0100 Subject: [PATCH] [PATCH 117/144] drop the "clangxx works" check from the vecmathlib age Gbp-Pq: Name 0117-drop-the-clangxx-works-check-from-the-vecmathlib-age.patch --- cmake/LLVM.cmake | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/cmake/LLVM.cmake b/cmake/LLVM.cmake index 79801af..a634fbd 100644 --- a/cmake/LLVM.cmake +++ b/cmake/LLVM.cmake @@ -554,51 +554,6 @@ ${TYPEDEF}" "typedef struct { char x; ${TYPE} y; } ac__type_alignof_; endmacro() -#################################################################### -# -# clangxx works check -# - -# TODO clang + vecmathlib doesn't work on Windows yet... -if(CLANGXX AND (NOT WIN32) AND ENABLE_HOST_CPU_DEVICES) - - message(STATUS "Checking if clang++ works (required by vecmathlib)") - - set(CXX_WORKS 0) - set(CXX_STDLIB "") - - if(NOT DEFINED CLANGXX_WORKS) - - custom_try_compile_clangxx("namespace std { class type_info; } \n #include \n #include " "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-std=c++11") - - if(NOT _STATUS_FAIL) - set(CXX_WORKS 1) - else() - custom_try_compile_clangxx("namespace std { class type_info; } \n #include \n #include " "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-stdlib=libstdc++" "-std=c++11") - if (NOT _STATUS_FAIL) - set(CXX_STDLIB "-stdlib=libstdc++") - set(CXX_WORKS 1) - else() - custom_try_compile_clangxx("namespace std { class type_info; } \n #include \n #include " "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-stdlib=libc++" "-std=c++11") - if(NOT _STATUS_FAIL) - set(CXX_STDLIB "-stdlib=libc++") - set(CXX_WORKS 1) - endif() - endif() - endif() - - set(CLANGXX_WORKS ${CXX_WORKS} CACHE INTERNAL "Clang++ ") - set(CLANGXX_STDLIB ${CXX_STDLIB} CACHE INTERNAL "Clang++ stdlib") - endif() - - -endif() - -if(CLANGXX_STDLIB AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) - set(LLVM_CXXFLAGS "${CLANGXX_STDLIB} ${LLVM_CXXFLAGS}") - set(LLVM_LDFLAGS "${CLANGXX_STDLIB} ${LLVM_LDFLAGS}") -endif() - #################################################################### # # - '-DNDEBUG' is a work-around for llvm bug 18253 -- 2.30.2